﻿using Orchard.Localization;
using Orchard.Security;
using Orchard.UI.Navigation;
using TissotWeb.ManageUsers;

namespace TissotWeb.ManageUsers {
    public class AdminMenu : INavigationProvider {
        public Localizer T { get; set; }
        public string MenuName { get { return "admin"; } }

        public void GetNavigation(NavigationBuilder builder) {
            builder.AddImageSet("Users")
                .Add(T("Normal Users"), "11",
                    menu => menu.Action("Index", "Admin", new { area = "TissotWeb.ManageUsers" }).Permission(Permissions.ManageNormalUsers)
                        .Add(T("Normal Users"), "1.0", item => item.Action("Index", "Admin", new { area = "TissotWeb.ManageUsers" })
                            .LocalNav().Permission(Permissions.ManageNormalUsers)));
        }
    }
}
